From: Adam Williamson Date: Tue, 15 Mar 2022 20:25:16 +0000 (-0700) Subject: appDisplay: Avoid double slash when creating default folders X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~480^2^2~85 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c5f6482705797f33f6411e4ee57755fa170eadeb;p=gnome-shell.git appDisplay: Avoid double slash when creating default folders Creating these default folders still doesn't work. After some investigation I found that's because the template we use for the path when creating the `child` `Gio.Settings` instance results in a double slash - it comes out as e.g. /org/gnome/desktop/app-folders//folders/Utilities/ . dconf does not gracefully handle this as many other things that handle paths do, it considers it a programmer error. It results in error messages like: dconf_changeset_set: assertion 'dconf_is_path (path, NULL)' failed which is slightly confusing. Anyway, we fix it by removing a slash from the template. Signed-off-by: Adam Williamson Part-of: --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 116e9931d..4fa2a5f63 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1471,7 +1471,7 @@ class AppDisplay extends BaseAppView { const { name, categories, apps } = DEFAULT_FOLDERS[folder]; const child = new Gio.Settings({ schema_id: 'org.gnome.desktop.app-folders.folder', - path: `${path}/folders/${folder}/`, + path: `${path}folders/${folder}/`, }); child.set_string('name', name); child.set_boolean('translate', true);